package com.sky.mapper;

import com.sky.annotation.Autofill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    @Autofill(value = OperationType.INSERT)
    void addCategory(Category category);

    List<Category> getPage(CategoryPageQueryDTO categoryPageQueryDTO);

    @Autofill(value = OperationType.UPDATE)
    void update(Category category);

    void delete(Long id);


    List<Category> getByType(Integer type);

}
